/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Modele;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Collection;

import java.util.HashSet;

/**
 *
 * @author sio
 */
public class DAO {

    public Collection getLesDeps() {
        Collection< Dep> lesDeps = new HashSet<Dep>();
        try {
            Connection con = Connect.get();
            Statement req;
            req = con.createStatement();
            ResultSet rs = req.executeQuery("select distinct departement from medecin");
            rs.next();
            Integer dep = rs.getInt("departement");

        } catch (SQLException e) {
            System.out.println("Erreur SQL :" + e);
        }
        return lesDeps;
    }

}
